import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import asyncCom from '@/pages/asyncCom'
import countTimer from '@/pages/countTimer'
import keepAlive from '@/pages/keepaline'
import keepAliveRouter from '@/pages/keepaliveRouter'
import vuexdemo1 from '@/pages/vuexDemo'
import vuexNameSpaced from '@/pages/vuexNameSpaced'
import module from '@/pages/vuexTest/module'
import flow from '@/pages/flow'
import chain from '@/pages/flowx'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      meta: {
        keepAlive: false,
        action: ''
      }
    },
    {
      path: '/asyncCom',
      name: 'asyncCom',
      component: asyncCom,
      meta: {
        keepAlive: false,
        action: ''
      }
    },
    {
      path: '/countTimer',
      name: 'countTimer',
      component: countTimer,
      meta: {
        keepAlive: false,
        action: ''
      }
    },
    {
      path: '/keepAlive',
      name: 'keepAlive',
      component: keepAlive,
      meta: {
        keepAlive: false,
        action: ''
      }
    },
    {
      path: '/keepAliveRouter',
      name: 'keepAliveRouter',
      component: keepAliveRouter,
      meta: {
        keepAlive: true,
        action: ''
      }
    },
    {
      path: '/flow',
      name: 'flow',
      component: flow,
      meta: {
        keepAlive: false,
        action: ''
      }
    },
    {
      path: '/chain',
      name: 'chain',
      component: chain,
      meta: {
        keepAlive: false,
        action: ''
      }
    },
    // {
    //   path: '/vuexdemo1',
    //   name: 'vuexdemo1',
    //   component: vuexdemo1,
    //   meta: {
    //     keepAlive: false,
    //     action: ''
    //   }
    // },
    // {
    //   path: '/vuexNameSpaced',
    //   name: 'vuexNameSpaced',
    //   component: vuexNameSpaced,
    //   meta: {
    //     keepAlive: false,
    //     action: ''
    //   }
    // },
    {
      path: '/module',
      name: 'module',
      component: module,
      meta: {
        keepAlive: false,
        action: ''
      }
    }
  ]
})
